package cn.tedu.com.bean;

import cn.tedu.com.enums.ReturnCode;
import lombok.Data;

import java.io.Serializable;

@Data
public class ResponseEntity<T> implements Serializable {
    private T t;
    private String message;
    private Integer code;

    public ResponseEntity(T t, ReturnCode returnCode) {
        this.t = t;
        this.message=returnCode.getMessge();
        this.code=returnCode.getCode();
    }

    public ResponseEntity(ReturnCode returnCode) {
        this.message=returnCode.getMessge();
        this.code=returnCode.getCode();

    }


}
